package com.example.manager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.manager.domain.SysMenu;
import com.example.manager.service.SysMenuService;
import com.example.manager.mapper.SysMenuMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_menu(菜单表)】的数据库操作Service实现
* @createDate 2024-10-10 16:09:28
*/
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu>
    implements SysMenuService{


    public List<SysMenu> findSysMenus(){
        return baseMapper.findSysMenus();
    }

    public List<SysMenu> findSysMenusByUserId(Integer userId){
        return baseMapper.findSysMenusByUserId(userId);
    }

    public List<SysMenu> findSysMenuTree(Integer parentId){
        return baseMapper.findSysMenuTree(parentId);
    }

    public List<SysMenu> findSysMenuTreeByUserId(Integer userId, Integer parentId){
        return baseMapper.findSysMenuTreeByUserId(userId,parentId);
    }

    public List<SysMenu> findSysMenusTreeNM(Integer parentId){
        return baseMapper.findSysMenusTreeNM(parentId);
    }

    public List<SysMenu> findBySys_RoleId(Integer roleId){
        return baseMapper.findBySys_RoleId(roleId);
    }

}




